Example: The following example shows accessing the font information from a PDF document.
import com.cete.dynamicpdf.merger.*;
public class MyClass{
public static void main(String args[]){
// Create a PdfdDocument object using the source pdf document
PdfDocument pdfDocument = new PdfDocument("[physicalpath]/Source.pdf");
// Get the font information from the pdfDocument
FontInformation[] fontInformation = pdfDocument.getFonts();
// Access the font specific details using FontInformation
FontInformation info = fontInformation[0];
// Get the font name
String fontName = info.getName();
// Gets true if the font is subset embedded
boolean isSubset = info.getSubset();
// Gets true if the font is fully embedded
boolean isEmbed = info.getEmbed();
// Gets Type of the Font
FontType fontType = info.getType();
}
}